﻿using System;

namespace ConsoleApp6
{
    class Program
    {
        static void Sumlto100()
        {
            int i = 1, sum1 = 0, sum2 = 0;
            while (i <=100)
            {
                if (i % 2 == 0)
                {
                    sum2 += i;
                }
                else
                {
                    sum1 += i;
                }
                i++;

            }
            Console.Write($"1+2+3+4+5+6+......+100的偶数和为:{sum2},奇数和为:{sum1}");

            
        }
        
    }
}
